<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ include file="/WEB-INF/views/include/constrant.jsp"%>
<html>
<head>
<title>订单一览</title>
<meta name="decorator" content="default" />
<script type="text/javascript">
	$(document).ready(function() {

	});
	function page(n, s) {
		$("#pageNo").val(n);
		$("#pageSize").val(s);
		$("#searchForm").submit();
		return false;
	}
</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li><a href="${ctx}/orders/tOrders/allOrderList">订单一览</a></li>
		<shiro:hasPermission name="orders:warn:view">
		<li  class="active"><a href="${ctx}/orders/tOrders/warnOrderList">未调度订单预警</a></li>
		</shiro:hasPermission>
	</ul>
	<form:form id="searchForm" action="${ctx}/orders/tOrders/warnOrderList"
		modelAttribute="TOrders" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}" />
		<input id="pageSize" name="pageSize" type="hidden"
			value="${page.pageSize}" />
		<div class="control-group">
			<label>车队：</label>
				<form:select path="office" class="input-medium">
				<option value="">--请选择--</option>
				<form:options items="${fns:getOfficeListByFlatType(\"1\")}" itemLabel="name" itemValue="id" htmlEscape="false" />
				</form:select>
			<label class="control-label">订单号：</label>
			<form:input path="orderid" htmlEscape="false" maxlength="50"
				class="input-small digit" />
		<input class="btn btn-primary" type="submit" value="查询" />
		</div>
		
	</form:form>
	<sys:message content="${message}" />
	<table class="table table-striped table-bordered table-condensed">
		<thead>
			<tr class="success">
				<th>订单号</th>
				<th>订单名称</th>
				<th>车队</th>
				<th>订单日期</th>
				<th>发车日期</th>
				<th>警示状态</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${page.list}" var="orders">
				<tr>			
					<td>${orders.orderid }</td>
					<td>${orders.ordername }<c:if test="${orders.istrouble == '1' }"><font title="${orders.reason }"><img src="${ctxStatic }/xiake/images/warn.png"/></font></c:if></td>
					<td><font title="${orders.office.operator}&#10;${orders.office.operatortel}">${orders.office.name }</font></td>
					<td><fmt:formatDate value="${orders.createDate }"
							pattern="yyyy-MM-dd HH:mm" /></td>
					<td><fmt:formatDate value="${orders.departdate }"
							pattern="yyyy-MM-dd HH:mm" /></td>
					<td>${orders.warnstatus}</td>
					<td><a href="${ctx}/orders/tOrders/warnForm?id=${orders.orderid}">查看</a>
					</td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>